package com.bdqn.petmalldemo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bdqn.petmalldemo.entity.Follow;
import com.bdqn.petmalldemo.vo.FollowProductVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Lenovo
 * @since 2020-02-10
 */
public interface FollowMapper extends BaseMapper<Follow> {
    /**
     * 根据当前用户Id分页查询收藏商品
     * @param userId
     * @param startIndex
     * @param pageSize
     * @return
     */
    List<FollowProductVO> selectFollowProductByUserId(@Param("userId")String userId,
                                                      @Param("startIndex") Integer startIndex,
                                                      @Param("pageSize")Integer pageSize);

    /**
     *根据当前用户Id查询总记录书
     * @param userId
     * @return
     */
    Integer countFollowProductByUserId(@Param("userId")String userId);
}
